import request from '@/utils/request'

// 查询打卡记录列表
export function listWorkAttendances(query) {
  return request({
    url: '/hrm/workAttendances/list',
    method: 'get',
    params: query
  })
}


// 查询打卡记录列表
export function statistics(query) {
    return request({
        url: '/hrm/workAttendances/statistics',
        method: 'get',
        params: query
    })
}


// 查询打卡记录详细
export function getWorkAttendances(id) {
  return request({
    url: '/hrm/workAttendances/' + id,
    method: 'get'
  })
}

// 新增打卡记录
export function addWorkAttendances(data) {
  return request({
    url: '/hrm/workAttendances',
    method: 'post',
    data: data
  })
}

// 修改打卡记录
export function updateWorkAttendances(data) {
  return request({
    url: '/hrm/workAttendances',
    method: 'put',
    data: data
  })
}

// 删除打卡记录
export function delWorkAttendances(id) {
  return request({
    url: '/hrm/workAttendances/' + id,
    method: 'delete'
  })
}
